import Vue from 'vue'
import Router from 'vue-router'
import menuList from '@/components/menuList/menuList'
import menuDetail from '@/components/menuDetail/menuDetail'
import address from '@/components/address/address'
import pay from '@/components/pay/pay'
import payFinish from '@/components/payFinish/payFinish'
import orderDetail from '@/components/orderDetail/orderDetail'
import orders from '@/components/orders/orders'

Vue.use(Router)

export default new Router({
  routes: [{
      path: '/',
      redirect: '/menuList'
    }, {
      path: '/menuList',
      component: menuList
    },
    {
      path: '/menudetail',
      component: menuDetail
    },
    {
      path: '/address',
      component: address
    },
    {
      path: '/pay',
      component: pay
    },
    {
      path: '/payFinish',
      component: payFinish
    },
    {
      path: '/orderDetail',
      component: orderDetail
    },
    {
      path: '/orders',
      component: orders
    }
  ],
  mode:"history"
})
